package cn.wx.scholar.core.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import cn.wx.common.persistence.base.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import cn.wx.scholar.core.service.ScholarMaxDataService;
import cn.wx.scholar.core.entity.ScholarMaxData;
import cn.wx.common.persistence.web.ResponseData;
import cn.wx.scholar.core.entity.qo.ScholarMaxDataQ;
/**
 *   @description : ScholarMaxData 控制器
 *   ---------------------------------
 *   @author  
 *   @since 2018-11-15
 */
@RestController
@RequestMapping("/scholarMaxData")
public class ScholarMaxDataController extends BaseController {

    @Autowired
    private ScholarMaxDataService scholarMaxDataService;

    /**
     * @description : 通过条件获取ScholarMaxData
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-11-15
     */
    @RequestMapping(value = "/query/unique", method = RequestMethod.POST)
    public ResponseData queryUnique(ScholarMaxDataQ scholarMaxDataQ) throws Exception {
        return success(scholarMaxDataService.queryUnique(scholarMaxDataQ,ScholarMaxData.class));
    }

    /**
     * @description : 通过条件获取ScholarMaxData分页
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-11-15
     */
    @RequestMapping(value = "/query/page", method = RequestMethod.POST)
    public ResponseData queryPage(ScholarMaxDataQ scholarMaxDataQ) throws Exception {
        return success(scholarMaxDataService.queryPage(scholarMaxDataQ));
    }

	/**
     * @description : 通过条件获取ScholarMaxData
     * ---------------------------------
     * @author : 
     * @since : Create in 2018-11-15
     */
    @RequestMapping(value = "/query/list", method = RequestMethod.POST)
    public ResponseData queryList(ScholarMaxDataQ scholarMaxDataQ) throws Exception {
        return success(scholarMaxDataService.queryList(scholarMaxDataQ));
    }
    
    /**
     * @description : 通过id删除ScholarMaxData
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-11-15
     */
    @RequestMapping(value = "/remove", method = RequestMethod.POST)
    public ResponseData remove(ScholarMaxData scholarMaxData) throws Exception {
        return success(scholarMaxDataService.remove(scholarMaxData));
    }

    /**
     * @description : 通过id更新ScholarMaxData
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-11-15
     */
    @RequestMapping(value = "/modify", method = RequestMethod.POST)
    public ResponseData modify(ScholarMaxData scholarMaxData) throws Exception {
        return success(scholarMaxDataService.modify(scholarMaxData));
    }
    
    /**
     * @description : 新增ScholarMaxData
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-11-15
     */
     @RequestMapping(value = "/create", method = RequestMethod.POST)
     public ResponseData create(ScholarMaxData scholarMaxData) throws Exception {
        return success(scholarMaxDataService.create(scholarMaxData));
     }
}